|
![](/i/fill.gif) |
hello,
for some reason I want to check if one point at spline-creation time is
equal to one point in an array.
More concrete:
There is an array[] of vectors which holds points of one future spline.
A macro creates a spline from it. While this macro creates spline I wish to
compare if actual processed point hits one predefined point from array[x].
pseudo-code:
>>>>>>>>>>>>>>>>>>>>>>>>
// define spline
#declare splinepoints = array[]{<x,y,z>,...}
// create spline
#declare splinepath = spline{cubic_spline #while...}
// draw balls on splinepath
#macro happyspline(splinepath)
#while (clock_counter <= maxpoint)
sphere {
splinepath(clock_counter), radius
}
// the comparison, which fails:
#if ( splinepath(clock_counter) = splinepoints[10] )
"HIT"
#end
clock_counter += anystep
#end //while
#end //macro
<<<<<<<<<<<<<<<<<<<<<<<<<
Then comes a parse error: "Float expected but vector or color expression
found."
And I ask: Why is splinepath(at_one_moment) no vector? What did I wrong?
Post a reply to this message
|
![](/i/fill.gif) |